/**
 * 
 */
package gpl.scotlandyard.services;

import gpl.scotlandyard.beans.basics.Link;
import gpl.scotlandyard.beans.basics.Player;
import gpl.scotlandyard.services.basics.BoardManager;
import gpl.scotlandyard.services.basics.PlayerManager;

import java.util.ArrayList;
import java.util.List;

/**
 * @author norbert
 *
 */
public class FreePlayerManager extends PlayerManager {

  /**
   * @param boardManager
   */
  public FreePlayerManager(BoardManager boardManager) {
    super(boardManager);
  }

  /**
   * 
   */
  public FreePlayerManager() {
    super();
  }

  @Override
  public void move(Player player, Link link) {
    player.setNode(link.getToNode());
  }

  @Override
  public List<Link> getMoves(Player player) {
    return new ArrayList<Link>(player.getNode().getLinks());
  }
}
